/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uvexposureapplication.server.preferencerepository;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author matthieukluj
 */
public class UserData {

    private String name;
    private int skinType;
    private int tempThreshold;
    private String currentLocation;
    private Map<String, String> suggestion;
    private int uvrOld;
    private int tempOld;

    public UserData() {
        this.suggestion = new HashMap<String, String>();
        this.uvrOld = 0;
        this.tempOld = 0;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSkinType() {
        return skinType;
    }

    public void setSkinType(int skinType) {
        this.skinType = skinType;
    }

    public int getTempThreshold() {
        return tempThreshold;
    }

    public void setTempThreshold(int tempThreshold) {
        this.tempThreshold = tempThreshold;
    }

    public Map<String, String> getSuggestionMap() {
        return suggestion;
    }

    public String getSuggestionUV() {
        String suggestions = "";
        for (Map.Entry<String, String> suggestionEntry : this.suggestion.entrySet()) {
            if (suggestionEntry.getKey().equals("UV")) {
                suggestions = suggestionEntry.getValue();
            }
        }
        return suggestions;
    }

    public String getSuggestionTemp() {
        String suggestions = "";
        for (Map.Entry<String, String> suggestionEntry : this.suggestion.entrySet()) {
            if (!suggestionEntry.getKey().equals("UV")) {
                suggestions = suggestionEntry.getValue();
            }
        }
        return suggestions;
    }

    public void setSuggestion(Map<String, String> suggestion) {
        this.suggestion = suggestion;
    }

    public void addSuggestion(String parameter, String value) {
        this.suggestion.put(parameter, value);
    }

    public String getCurrentLocation() {
        return currentLocation;
    }

    public void setCurrentLocation(String currentLocation) {
        this.currentLocation = currentLocation;
    }

    public int getTempOld() {
        return tempOld;
    }

    public void setTempOld(int tempOld) {
        this.tempOld = tempOld;
    }

    public int getUvrOld() {
        return uvrOld;
    }

    public void setUvrOld(int uvrOld) {
        this.uvrOld = uvrOld;
    }
}
